package com.pingan.haofang.searchcloud.index.dto;

import com.pingan.haofang.searchcloud.common.rpc.RPCResultData;

import java.util.List;

/**
 * 增量变更消息
 *
 * @author LUYI374
 * @date 2017年3月27日
 * @since 1.0.0
 */
public class IndexBuildIncDTO {

    /**
     * id集合
     */
    private List<String> idList;

    /**
     * 全字段传输
     */
    private List<RPCResultData> content;

    /**
     * 项目code
     */
    private String projectCode;

    /**
     * INDEX名称
     */
    private String indexName;

    /**
     * 数据源名称
     */
    private String dataSourceName;

    /**
     * 数据操作方式 0-保存、1-删除
     */
    private int operation;

    /**
     * 数据变更时间
     */
    private long timestamp;

    public List<String> getIdList() {
        return idList;
    }

    public void setIdList(List<String> idList) {
        this.idList = idList;
    }

    public String getProjectCode() {
        return projectCode;
    }

    public void setProjectCode(String projectCode) {
        this.projectCode = projectCode;
    }

    public String getIndexName() {
        return indexName;
    }

    public void setIndexName(String indexName) {
        this.indexName = indexName;
    }

    public String getDataSourceName() {
        return dataSourceName;
    }

    public void setDataSourceName(String dataSourceName) {
        this.dataSourceName = dataSourceName;
    }

    public long getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(long timestamp) {
        this.timestamp = timestamp;
    }

    public int getOperation() {
        return operation;
    }

    public void setOperation(int operation) {
        this.operation = operation;
    }

    public List<RPCResultData> getContent() {
        return content;
    }

    public void setContent(List<RPCResultData> content) {
        this.content = content;
    }

    @Override
    public String toString() {
        return "IndexBuildIncDTO{" +
                "idList=" + idList +
                ", content.size =" + (content == null ? 0 : content.size()) +
                ", projectCode='" + projectCode + '\'' +
                ", indexName='" + indexName + '\'' +
                ", dataSourceName='" + dataSourceName + '\'' +
                ", operation=" + operation +
                ", timestamp=" + timestamp +
                '}';
    }
}
